package com.shuangti;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {


/*        System.out.println("请输入一个三位数");
        //scanner接受用户  scan  扫描
        Scanner scanner = new Scanner(System.in);
        int input = scanner.nextInt();
        //求个、十、百位
        int gewei = input%10;
        int shiwei = input/10%10;
        int baiwei = input/100;
        System.out.println("个位是"+gewei);
        System.out.println("十位是"+shiwei);
        System.out.println("百位是"+baiwei);

        int a = 1;
        int b = ++a + a++ + --a + a--;
        System.out.println(a);
        System.out.println(b);*/


        //赋值运算符  性能更好，不用强制转换，eg:a=+b  (a='a', b=1)

//三元运算符
    /*    System.out.println("请用户输入2个数");
        Scanner scanner = new Scanner(System.in);
        int num1 = scanner.nextInt();
        int num2 = scanner.nextInt();

        int max = num1>num2 ? num1:num2;
        int min = num1>num2 ? num2:num1;
        System.out.println("最大值："+max);
        System.out.println("最小值："+min);*/

    }
}
